#define _CRT_SECURE_NO_WARNINGS 1

#include <iostream>
using namespace std;
#include <map>
#include <set>
#include <string>

int main()
{
	map<string, int> mp;
	string word;
	while (cin >> word)
	{
		mp[word]++;
	}
	for (const auto& e : mp)
	{
		cout << e.first << ":" << e.second << endl;
	}

	return 0;
}